<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/6/4 0004
 * Time: 13:50
 */

namespace app\admin\validate;


use think\Validate;

class Set extends Validate
{
    protected $rule = [
        'default'   =>  '',
        'orderby'   =>  'between:1,100',
        'show'      =>  'require|in:1,0',
        'content'   =>  'require',
        'id'        =>  'require',
        'title'		=>  'require',
      	'banner'	=>	'require',


    ];

    protected $message = [
        'data.require'  =>  '请上传文件',
        'data.file'     =>  '文件格式不正确',
        'orderby.between'=> '请输入1-100之间的数字',
        'show.require'  =>  '请选择显示或隐藏',
        'show.in'       =>  '请选择正确的选项',
        'content.require' =>  '请输入内容',
        'img.require'   =>  '请上传图片',
      	'title.require' =>	'请输入文章标题',
        'banner'		=>	'请上传文章banner图'
    ];

    protected $scene = [
        'bannerfile'    =>  ['default'],
        'bannerlist'    =>  ['default'],
        'bannerdetail'  =>  ['default'],
        'bannerdel'     =>  ['default'],
        'bannerset'     =>  ['banner','title','show','content'],
        'commonlist'    =>  ['data'],
        'commondetail'  =>  ['id'],
        'commonfile'    =>  ['default'],
        'commonset'     =>  ['content','id'],
        'fuwenbencontent'=>  ['default'],
    ];
}